1. Field of the Invention
The present invention relates to an image processing method and system, and, in particular, to an image processing method and system directly extracting continuous components (patterns) from given image data which is in a data form encoded using, particularly, the well-known MH (Modified Huffman) encoding method, MMR (Modified Modified READ (Relative Element Address Designate)) encoding method, or MR (Modified READ) encoding method, each of which is normally used in facsimile transmission.
2. Description of the Related Art
A technique for extracting, at high speed, continuous components (patterns) from given image data is necessary for an image compression method in which patterns are extracted from given image data and are then represented by appropriate templates, and is also necessary for character recognition. In particular, when O.A. (Office Automation) machines are linked via a network and facsimile machines are used as means for transmitting and receiving data via the network, a technique for processing, at high speed, information received through a facsimile machine is important.
However, in the related art, it is necessary that given image data encoded into run length codes, which codes are used in facsimile transmission, is returned to a bit-map form. Then, the given image data in the bit-map form is used for extracting patterns therefrom. If such a method is used, it is difficult to reduce a time required for processing the given image data.
In order to reduce the above-mentioned processing time, a method was proposed in which two-scan-line scanning is performed. Further, similar to the two-scan-line scanning, a method of performing a labeling operation directly on run length codes was proposed. Further, using the fact that MR codes (or MMR codes) have therein information concerning the continuous components of a given image, a method of performing the labeling operation directly on the MR codes so as to extract the continuous components was proposed. (See Image Component Labeling from MR Codes, Electronic Information Communication Society Paper, D-II, Vol.J76-D-II, No.11, pp.2341-2348, November, 1993; and Japanese Laid-Open Patent Application No.4-85685.)
In the method disclosed in the above-mentioned paper or laid-open patent application, when the labeling operation is performed on given image data encoded into the MR codes, it is necessary to determine which one from among three encoding modes was used in obtaining the given image data as a result of encoding according to the MR encoding method. In addition to this, it is also necessary to determine a color of a first pixel in a relevant run (a series of pixels having the same color), a state of a color of a pixel in a reference line (scan line) at the same position as that of the above-mentioned pixel, a color of a pixel in the reference line at the same position as that of a first pixel of a run continuous with the relevant run, and a color of the preceding pixel. Thus, a relevant process is complex. Further, in the technique disclosed in the Japanese laid-open patent application, when labels are linked to one another, each set of labels to be linked is stored, and then, new labels are designated to the stored sets. Thus, a relevant process requires considerable time.